package ua.dou.fragments;

import android.os.Bundle;
import android.support.v4.content.Loader;
import com.sun.syndication.feed.synd.SyndFeed;
import ua.dou.loader.Response;
import ua.dou.loader.RssLoader;

/**
 * Implementation of Loader Fragment.
 * @see LoaderFragment;
 * User: David Mayboroda
 */
public class RssListFragment extends LoaderFragment<SyndFeed> {

    @Override
    public Loader<Response<SyndFeed>> createLoader(int id, Bundle bundle) {
        return new RssLoader(getActivity(), bundle);
    }

    public void fetch(final int id, final String url){
        Bundle bundle = new Bundle();
        bundle.putString(RssLoader.URL_FLAG, url);
        setupLoader(id, bundle);
    }

    @Override
    public void onLoaderResult(int id, SyndFeed data) {

    }

}
